<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
    <% String path=request.getContextPath(); String basePath=request.getScheme() + "://" + request.getServerName() + ":"
        + request.getServerPort() + path + "/" ; %>

        <!DOCTYPE html>
        <html>

        <head>
            <base href="<%=basePath%>">

            <title>价格维护</title>

            <meta http-equiv="pragma" content="no-cache">
            <meta http-equiv="cache-control" content="no-cache">
            <meta http-equiv="expires" content="0">
            <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
            <meta http-equiv="description" content="This is my page">
            <!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

        </head>

        <body>
            <%@ include file="/WEB-INF/jsp/common/header.jsp" %>
                <%@ include file="/WEB-INF/jsp/common/loadDiv.jsp" %>

                    <script type="text/javascript">
                        $(function () {
                            // $('#startTime').datebox('setValue', getBeforeCurrentDate30Days());
                            // $('#endTime').datebox('setValue', getNowFormatDate());
                            bindgrid();
                            initBank();
                            // initBank1();
                            // initBank2();
                            loadCombotree();
                            // bindgridSubject();
                            // bindgridBank();
                        });

                        function initBank(name) {
                            $('#infBankName').combogrid({
                                // 				panelWidth : 100,
                                url: 'sys/bank/selectComboxList?rows=100&page=1',
                                queryParams: {
                                    q: name
                                },
                                idField: 'code',
                                textField: 'name',
                                mode: 'remote',
                                required: true,
                                fitColumns: true,
                                columns: [[{
                                    field: 'name',
                                    title: '名称',
                                    width: 150
                                }]]
                            });
                        }

                        function saveBank() {
                            var status = $('#infStatus').textbox('getValue');
                            if (status == '审核中') {
                                // $.messager.alert('提示', '审核中不允许修改!');
                                // return;
                            }
                            var reg = /^[0-9]*$/;
                            if (!reg.test($('#infBankNumber').textbox('getValue'))) {
                                $.messager.alert('提示', '账号只能是数字!');
                                return;
                            }
                            if (!checkComboGridValue('infBankName', 'code')) {
                                $.messager.alert('提示', '请选择正确开户银行!');
                                return;
                            }

                            if (!$('#fmBank').form('validate')) {
                                $.messager.alert('提示', '请完成必填项输入!');
                                return;
                            }
                            if (!$('#infId').textbox('getValue')) {
                                $.messager.alert('提示', '请先点击保存!');
                                return;
                            }
                            var row = $('#dg').datagrid('getSelected');
                            var model = {
                                infId: $('#infId').textbox('getValue'),
                                infName: $('#infName').textbox('getValue'),
                                bakCode: $('#infBankName').combogrid('getValue'),
                                bakName: $('#infBankName').combogrid('getText'),
                                bakOwnerName: $('#infBankAccount').textbox('getValue'),
                                bakNum: $('#infBankNumber').textbox('getValue'),
                                bakCountry: $('#infCountry').combobox('getValue'),
                                status: '0'
                            }
                            $.ajax({
                                type: "post",
                                dataType: "json",
                                url: 'supply/bank/save',
                                data: JSON.stringify(model),
                                contentType: "application/json",
                                success: function (data) {
                                    $.messager.alert('提示', data.msg);
                                    $('#dlgBank').dialog('close');
                                    if (data.code == 60200) {
                                        init(row);
                                    }

                                },
                                error: function (XMLHttpRequest, textStatus, errorThrown) {
                                    alert(errorThrown);
                                }
                            })

                        }

                        function delBank(row) {
                            $.ajax({
                                type: "delete",
                                dataType: "json",
                                url: 'supply/bank/delete?bakCode=' + row.bakCode + "&infId=" + row.infId,

                                contentType: "application/json",
                                success: function (data) {
                                    $.messager.alert('提示', data.msg);
                                    if (data.code == 60200) {
                                        init(row);
                                    }
                                    $('#dlgBank').dialog('close');
                                },
                                error: function (XMLHttpRequest, textStatus, errorThrown) {
                                    alert(errorThrown);
                                }
                            })

                        }

                        function bindgridBank(dataArray) {
                            $('#ttBank').datagrid(
                                {
                                    title: '银行列表',
                                    queryParams: {
                                    },
                                    data: dataArray,
                                    // url: "supply/bank/selectList",
                                    iconCls: 'icon-application',
                                    width: 780,
                                    height: 400,
                                    nowrap: true,
                                    filterDelay: 0,
                                    rownumbers: true,
                                    animate: false,
                                    collapsible: false,
                                    clientPaging: false,
                                    remoteFilter: true,
                                    singleSelect: true,
                                    pagination: false,
                                    frozenColumns: [[]],
                                    columns: [[{
                                        field: 'bakName',
                                        title: '开户银行名称',
                                        width: 200,
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'bakOwnerName',
                                        title: '账户姓名',
                                        width: 100,
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'bakNum',
                                        title: '账户号码',
                                        sortable: true,
                                        width: 100,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'createTime',
                                        title: '创建时间',
                                        width: 120,
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    },
                                    {
                                        field: 'updateTime',
                                        title: '修改时间',
                                        width: 120,
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }]],
                                    toolbar: [{
                                        text: '增加',
                                        iconCls: 'icon-add',
                                        handler: function () {
                                            $('#dlgBank').dialog('open').dialog('center').dialog('setTitle', '银行信息');
                                            $('#fmBank').form('clear');
                                        }
                                    },
                                        '-',
                                    {
                                        text: '编辑',
                                        iconCls: 'icon-edit',
                                        handler: function () {
                                            var row = $('#ttBank').datagrid('getSelected');
                                            if (row) {
                                                $('#dlgBank').dialog('open').dialog('center').dialog('setTitle', '银行信息');
                                                $('#infBankName').combogrid('setValue', row.bakCode);
                                                $('#infBankName').combogrid('setText', row.bakName);
                                                $('#infBankAccount').textbox('setValue', row.bakOwnerName);
                                                $('#infBankNumber').textbox('setValue', row.bakNum);
                                            }
                                        }
                                    },
                                        '-',
                                    {
                                        text: '删除',
                                        iconCls: 'icon-cancel',
                                        handler: function () {
                                            var row = $('#ttBank').datagrid(
                                                'getSelected');
                                            if (row) {
                                                $.messager.confirm('提示', '确定要删除这个吗?', function (r) {
                                                    if (r) { delBank(row); }
                                                });
                                            } else {
                                                $.messager.alert('提示', '请选择一条数据')
                                            }
                                        }
                                    }],
                                    onLoadSuccess: function () {
                                    },
                                    onDblClickRow: function () {
                                    }
                                });
                        }
                        function initBank(name) {
                            $('#infBankName').combogrid({
                                // 				panelWidth : 100,
                                url: 'sys/bank/selectComboxList?rows=100&page=1',
                                queryParams: {
                                    q: name
                                },
                                idField: 'code',
                                textField: 'name',
                                mode: 'remote',
                                required: true,
                                fitColumns: true,
                                columns: [[{
                                    field: 'name',
                                    title: '名称',
                                    width: 150
                                }]]
                            });
                        }

                        function loadCombotree() {
                            $('#comAdmit').combotree({
                                url: 'sys/mm/type/selectTreeList',
                                multiple: true,
                                animate: true,
                                onLoadSuccess: function () {
                                    $('#comAdmit').combotree('tree').tree("collapseAll");
                                }
                            });
                        }

                        function init(row) {
                            $
                                .ajax({
                                    type: "get",
                                    dataType: "json",
                                    url: 'supply/info/selectInfor?id=' + row.infId,
                                    // 				data : JSON.stringify(model),
                                    contentType: "application/json",
                                    success: function (data) {
                                        if (data.code != 60200) {
                                            $.messager.alert('消息', data.msg);
                                        } else {
                                            var json = data.data;
                                            if (json.infAdmitLevel) {
                                                $('#comAdmit').combotree('setValues',
                                                    json.infAdmitLevel.split(','));
                                            }
                                            $('#infId').textbox('setValue', json.infId);
                                            $('#oaStatus').textbox('setValue', json.oaStatus);
                                            $('#infStatus')
                                                .textbox(
                                                    'setValue',
                                                    json.infApprovalStatus == 1 ? (json.status == 0 ? '审核中'
                                                        : '审核通过')
                                                        : '待提交');
                                            if (json.infApprovalStatus == 1
                                                && json.status == 0) {
                                                // $('#btnSave').linkbutton('disable');
                                                // $('#btnCommit').linkbutton('disable');
                                            }
                                            $('#infCode').textbox('setValue', json.infCode);
                                            $('#infName').textbox('setValue', json.infName);
                                            if (json.infCode) {
                                                $('#infName').textbox('disable');
                                            } else {
                                                $('#infName').textbox('enable');
                                            }
                                            $('#infAddress').textbox('setValue',
                                                json.infAddress);
                                            $('#infCreditCode').textbox('setValue',
                                                json.infCreditCode);
                                            $('#infCountry').combobox('setValue',
                                                json.infCountryCode);
                                            $('#infProvince').combobox('setValue',
                                                json.infProvinceCode);
                                            $('#cobCondition').combobox('setValue',
                                                json.infConditionCode);
                                            if (json.infType) {
                                                $('#infType').combobox('setValue',
                                                    json.infType);
                                                $('#infType').combobox('setText',
                                                    json.infCatagory);
                                            }
                                            $('#infCity').textbox('setValue', json.infCity);
                                            $('#infAddress').textbox('setValue',
                                                json.infAddress);
                                            $('#infMobile').textbox('setValue',
                                                json.infMobile);
                                            $('#infMobile').textbox('setValue',
                                                json.infMobile);
                                            $('#infGroup').textbox('setValue',
                                                json.infGroupCode);
                                            $('#infGroupName').textbox('setValue',
                                                json.infGroupName);
                                            $('#infExplain').textbox('setValue',
                                                json.infExplain);
                                            $('#infMail').textbox('setValue',
                                                json.infMail);
                                            $('#infContactsName').textbox('setValue',
                                                json.infContactsName);
                                            $('#infLegalPerson').textbox('setValue',
                                                json.infLegalPerson);
                                            // if (detail.length > 0) {
                                            // 	initBank(detail[0].bakName);
                                            // 	$('#infBankName').combogrid('setValue',
                                            // 		detail[0].bakCode);
                                            // 	$('#infBankName').combogrid('setText',
                                            // 		detail[0].bakName);
                                            // 	$('#infBankAccount').textbox('setValue',
                                            // 		detail[0].bakOwnerName);
                                            // 	$('#infBankNumber').textbox('setValue',
                                            // 		detail[0].bakNum);
                                            // }
                                            bindgridBank(json.bankModels);
                                            bindgridSubject(json.corpModels);
                                            $('#infTax').combobox('setText', json.infTax);
                                            console.log('json.infTax', json.infTax);
                                            $('#infTax').combobox('setValue',
                                                json.infTaxCode);
                                            getFileList(json.infId);

                                        }
                                    },
                                    error: function (XMLHttpRequest, textStatus,
                                        errorThrown) {
                                        $.messager.alert('消息', errorThrown);
                                    }
                                })
                        }

                        function delSubject(row) {
                            $.ajax({
                                type: "delete",
                                dataType: "json",
                                url: 'supply/corp/delete?corpCode=' + row.corpCode + "&infId=" + row.infId,
                                contentType: "application/json",
                                success: function (data) {
                                    $.messager.alert('提示', data.msg);
                                    $('#dlgSubject').dialog('close');
                                    if (data.code == 60200) {
                                        init(row);
                                    }

                                },
                                error: function (XMLHttpRequest, textStatus, errorThrown) {
                                    alert(errorThrown);
                                }
                            })

                        }

                        function saveSubject() {
                            var status = $('#infStatus').textbox('getValue');
                            if (status == '审核中') {
                                // $.messager.alert('提示', '审核中不允许修改!');
                                // return;
                            }
                            if (!$('#fmSubject').form('validate')) {
                                alert('请完成必填项输入');
                                return;
                            }
                            if (!$('#infId').textbox('getValue')) {
                                alert('请先点击保存!');
                                return;
                            }
                            var row = $('#dg').datagrid('getSelected');
                            var model = {
                                infId: $('#infId').textbox('getValue'),
                                infName: $('#infName').textbox('getValue'),
                                corpCode: $('#cobCorp').combobox('getValue'),
                                corpName: $('#cobCorp').combobox('getText'),
                                subjectCode: $('#cobSubject').combobox('getValue'),
                                subjectName: $('#cobSubject').combobox('getText'),
                                status: '0'
                            }
                            $.ajax({
                                type: "post",
                                dataType: "json",
                                url: 'supply/corp/save',
                                data: JSON.stringify(model),
                                contentType: "application/json",
                                success: function (data) {
                                    $.messager.alert('提示', data.msg);
                                    $('#dlgSubject').dialog('close');
                                    if (data.code == 60200) {
                                        init(row);
                                    }

                                },
                                error: function (XMLHttpRequest, textStatus, errorThrown) {
                                    alert(errorThrown);
                                }
                            })

                        }

                        function bindgridSubject(dataArray) {
                            $('#ttSubject').datagrid(
                                {
                                    title: '科目列表',
                                    queryParams: {
                                    },
                                    data: dataArray,
                                    // url: "supply/corp/selectList",
                                    iconCls: 'icon-application',
                                    width: 780,
                                    height: 400,
                                    nowrap: true,
                                    filterDelay: 0,
                                    rownumbers: true,
                                    animate: false,
                                    collapsible: false,
                                    clientPaging: false,
                                    remoteFilter: true,
                                    singleSelect: true,
                                    pagination: false,
                                    frozenColumns: [[]],
                                    columns: [[{
                                        field: 'corpCode',
                                        title: '公司代码',
                                        sortable: true,
                                        hidden: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'corpName',
                                        title: '公司名称',
                                        sortable: true,
                                        width: 150,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'subjectCode',
                                        title: '科目代码',
                                        sortable: true,
                                        hidden: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'subjectName',
                                        title: '科目名称',
                                        sortable: true,
                                        width: 150,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                        // }, {
                                        // 	field: 'bakOwnerName',
                                        // 	title: '所有人名称',
                                        // 	sortable: true,
                                        // 	formatter: function (val, rec) {
                                        // 		return val ? unescape(val) : '';
                                        // 	}
                                        // }, {
                                        // 	field: 'bakMode',
                                        // 	title: '付款方式',
                                        // 	sortable: true,
                                        // 	formatter: function (val, rec) {
                                        // 		return val ? unescape(val) : '';
                                        // 	}
                                        // }, {
                                        // 	field: 'bakModeName',
                                        // 	title: '付款方式描述',
                                        // 	sortable: true,
                                        // 	formatter: function (val, rec) {
                                        // 		return val ? unescape(val) : '';
                                        // 	}
                                    }, {
                                        field: 'createTime',
                                        title: '创建时间',
                                        width: 120,
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    },
                                    {
                                        field: 'updateTime',
                                        title: '修改时间',
                                        width: 120,
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }]],
                                    toolbar: [{
                                        text: '增加',
                                        iconCls: 'icon-add',
                                        handler: function () {
                                            $('#dlgSubject').dialog('open').dialog('center').dialog('setTitle', '经营范围');
                                            $('#fmSubject').form('clear');
                                        }
                                    },
                                        '-',
                                    // {
                                    // 	text: '编辑',
                                    // 	iconCls: 'icon-edit',
                                    // 	handler: function () {
                                    // 		editSubject()
                                    // 	}
                                    // },
                                    // 	'-',
                                    {
                                        text: '删除',
                                        iconCls: 'icon-cancel',
                                        handler: function () {
                                            var row = $('#ttSubject').datagrid(
                                                'getSelected');
                                            if (row) {
                                                $.messager.confirm('提示', '确定要删除这个吗?', function (r) {
                                                    if (r) { delSubject(row); }
                                                });
                                            } else {
                                                $.messager.alert('提示', '请选择一条数据')
                                            }
                                        }
                                    }],
                                    onLoadSuccess: function () {
                                    },
                                    onDblClickRow: function () {
                                    }
                                });
                        } 
                    </script>
                    <script>
                        function del(node) {
                            $.ajax({
                                type: "delete",
                                url: 'supply/info/delete?id=' + node.infId,
                                //                dataType: "xml",				
                                success: function (data) {
                                    $.messager.alert('消息', data.msg);
                                    $('#add').window('close');
                                    var dg = $('#dg');
                                    dg.datagrid('enableFilter');
                                    dg.datagrid('load', {
                                        // startTime: startTime ? startTime : '',
                                        // endTime: endTime ? endTime : '',
                                        infApprovalStatus: status ? status : ''
                                    });
                                },
                                error: function (XMLHttpRequest, textStatus, errorThrown) {
                                    $.messager.alert('消息', errorThrown);
                                }
                            });
                        }

                        function save(action) {
                            if (!$('#fm').form('validate')) {
                                $.messager.alert('提示', '请录入基本信息必填项');
                                return;
                            }
                            if ($('#oaStatus').textbox('getValue') == '1') {
                                $.messager.alert('提示', '审核中不允许修改');
                                return;
                            }
                            var length = $('#comAdmit').combotree('getValues').join().length;
                            if (length > 1000) {
                                $.messager.alert('提示', '准入目录选择过多，请准确选择');
                                return;
                            }

                            if (action == '1') {
                                var banks = $('#ttBank').datagrid('getRows');
                                if (!banks || banks.length == 0) {
                                    $.messager.alert('提示', '请录入银行信息');
                                    return;
                                }
                                var Subject = $('#ttSubject').datagrid('getRows');
                                if (!Subject || Subject.length == 0) {
                                    $.messager.alert('提示', '请录入经营范围');
                                    return;
                                }
                            }

                            var model = {
                                infAdmitLevel: $('#comAdmit').combotree('getValues').join(),
                                infId: $('#infId').textbox('getValue'),
                                oaStatus: $('#oaStatus').textbox('getValue'),
                                infCode: $('#infCode').textbox('getValue'),
                                infName: $('#infName').textbox('getValue'),
                                infCreditCode: $('#infCreditCode').textbox('getValue'),
                                infCountryCode: $('#infCountry').combobox('getValue'),
                                infLegalPerson: $('#infLegalPerson').textbox('getValue'),
                                infCountry: $('#infCountry').combobox('getText'),
                                infProvince: $('#infProvince').combobox('getText'),
                                infProvinceCode: $('#infProvince').combobox('getValue'),
                                infCity: $('#infCity').textbox('getValue'),
                                infAddress: $('#infAddress').textbox('getValue'),
                                infMobile: $('#infMobile').textbox('getValue'),
                                infContactsName: $('#infContactsName').textbox('getValue'),
                                infTax: $('#infTax').combobox('getText'),
                                infTaxCode: $('#infTax').combobox('getValue'),
                                infBranchName: $('#infBankName').combogrid('getValue'),
                                infBankName: $('#infBankName').combogrid('getText'),
                                infBankAccount: $('#infBankAccount').textbox('getValue'),
                                infBankNumber: $('#infBankNumber').textbox('getValue'),
                                infCatagory: $('#infType').combobox('getText'),
                                infType: $('#infType').combobox('getValue'),
                                infConditionCode: $('#cobCondition').combobox('getValue'),
                                infConditionName: $('#cobCondition').combobox('getText'),
                                infGroupCode: $('#infGroup').textbox('getValue'),
                                infGroupName: $('#infGroupName').textbox('getValue'),
                                infExplain: $('#infExplain').textbox('getValue'),
                                infMail: $('#infMail').textbox('getValue'),
                                bankModels: banks,
                                corpModels: Subject
                            };
                            if (action == '1') {
                                let choiseFile = $("#checkfileList>li");
                                let yyzz = 0, wts = 0, sfz = 0;
                                $.each(choiseFile, function (index1, item) {
                                    if (item.innerText.indexOf('营业执照') >= 0) {
                                        yyzz = 1;
                                    }
                                    if (item.innerText.indexOf('委托书') >= 0) {
                                        wts = 1;
                                    }
                                    if (item.innerText.indexOf('身份证') >= 0) {
                                        sfz = 1;
                                    }
                                });
                                if (yyzz == 0) {
                                    alert('附件名称中缺少营业执照!');
                                    return;
                                }
                                if (wts == 0) {
                                    alert('附件名称中缺少委托书!');
                                    return;
                                }
                                if (sfz == 0) {
                                    alert('附件名称中缺少身份证!');
                                    return;
                                }
                                model.infApprovalStatus = '1';
                                model.status = '0';
                            } else {
                                model.infApprovalStatus = '0';
                            }
                            $.ajax({
                                type: "post",
                                dataType: "json",
                                url: 'supply/info/save',
                                data: JSON.stringify(model),
                                contentType: "application/json",
                                success: function (data) {
                                    if (data.code == 60200) {
                                        if (action == '0') {
                                            $.messager.alert('消息', data.msg);
                                            saveAttch(model.infId, model, 'save');
                                            var dg = $('#dg');
                                            dg.datagrid('enableFilter');
                                            dg.datagrid('load', {
                                                // startTime: startTime ? startTime : '',
                                                // endTime: endTime ? endTime : '',
                                                infApprovalStatus: status ? status : ''
                                            });
                                            $('#add').dialog('close');
                                        } else {
                                            saveAttch(model.infId, model, action == '0' ? 'save' : 'submit');
                                        }
                                    }
                                    else {
                                        $.messager.alert('消息', data.msg);
                                    }
                                },
                                error: function (XMLHttpRequest, textStatus, errorThrown) {
                                    $.messager.alert('消息', errorThrown);
                                }
                            })

                        }

                        function editrow(active) {
                            if (active) {
                                $('#tabs').tabs('showTool');
                            } else {
                                $('#tabs').tabs('hideTool');
                            }
                            //编辑用户
                            var row = $('#dg').datagrid('getSelected');
                            if (row) {
                                $('#add').window('open');
                                if (data.code == 60200) {
                                    init(row);
                                }

                            } else {
                                $.messager.alert('消息', '请选中一条数据');
                            }
                        }

                        function showDetail(index) {
                            $('#tabs').tabs('hideTool');
                            var rows = $('#dg').datagrid('getRows');
                            var row = rows[index];
                            if (row) {
                                $('#add').window('open');
                                init(row);
                            } else {
                                $.messager.alert('消息', '请选中一条数据');
                            }
                        }
                    </script>
                    <script>
                        function selectList() {
                            // var startTime = $('#startTime').datebox('getValue')
                            // var endTime = $('#endTime').datebox('getValue')
                            var status = $('#status').combobox('getValue');
                            var dg = $('#dg');
                            dg.datagrid('enableFilter');
                            dg.datagrid('load', {
                                // startTime: startTime ? startTime : '',
                                // endTime: endTime ? endTime : '',
                                infApprovalStatus: status ? status : '',
                                createId: PUser.userid
                            });
                        }
                        function bindgrid() {
                            // var startTime = $('#startTime').datebox('getValue')
                            // var endTime = $('#endTime').datebox('getValue')
                            var status = $('#status').combobox('getValue');
                            $('#dg').datagrid(
                                {
                                    title: '',
                                    url: "supply/info/selectList",
                                    iconCls: 'icon-application',
                                    queryParams: {
                                        // startTime: startTime,
                                        // endTime: endTime,
                                        infApprovalStatus: status,
                                        createId: PUser.userid
                                    },
                                    width: getWidth(0.98),
                                    height: 400,
                                    nowrap: true,
                                    filterDelay: 0,
                                    rownumbers: true,
                                    animate: false,
                                    collapsible: false,
                                    clientPaging: false,
                                    remoteFilter: true,
                                    singleSelect: true,
                                    pagination: true,
                                    remoteSort: true,
                                    frozenColumns: [[{
                                        field: 'infId',
                                        title: '供应商id',
                                        sortable: true,
                                        hidden: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infCode',
                                        title: '编码',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infName',
                                        title: '名称',
                                        sortable: true,
                                        formatter: function (val, rec, index) {
                                            return '<a href="javascript:void(0)" onclick="showDetail(' + index +
                                                ')">' + (val ? val : '') + '</a>'
                                        }
                                    }]],
                                    columns: [[{
                                        field: 'infCreditCode',
                                        title: '社会信用代码',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    },
                                    {
                                        field: 'classification',
                                        title: '客户分类',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(rec.classificationDescr) : '';
                                        }
                                    },
                                    {
                                        field: 'infCountry',
                                        title: '国家',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infProvince',
                                        title: '地区',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infCity',
                                        title: '地市',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infAddress',
                                        title: '单位地址',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infMobile',
                                        title: '手机',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infContactsName',
                                        title: '联系人姓名',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infNature',
                                        title: '性质',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infBranchName',
                                        title: '开户银行代码',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infBankName',
                                        title: '开户银行名称',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infBankAccount',
                                        title: '账户',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infBankNumber',
                                        title: '账户所有人',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infApprovalStatus',
                                        title: '提交状态',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'oaStatus',
                                        title: 'oa审批状态',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'status',
                                        title: '主数据状态',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'createTime',
                                        title: '创建时间',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'createName',
                                        title: '创建人',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'updateName',
                                        title: '修改人',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'updateTime',
                                        title: '修改时间',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'delFlag',
                                        title: '是否删除',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'remark',
                                        title: '备注',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infCountryCode',
                                        title: '国家编码',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infCatagory',
                                        title: '语言',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infType',
                                        title: '语言编码',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infProvinceCode',
                                        title: '地区编码',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infTax',
                                        title: '税类别描述',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }, {
                                        field: 'infTaxCode',
                                        title: '税类别编码',
                                        sortable: true,
                                        formatter: function (val, rec) {
                                            return val ? unescape(val) : '';
                                        }
                                    }]],
                                    toolbar: [{
                                        text: '新增',
                                        iconCls: 'icon-add',
                                        handler: function () {
                                            $('#fm').form('clear');
                                            $('#infName').textbox('enable');
                                            bindgridBank([]);
                                            bindgridSubject([]);
                                            getFileList('-1');
                                            $('#add').window('open');
                                        }
                                    }, {
                                        text: '编辑',
                                        iconCls: 'icon-edit',
                                        handler: function () {
                                            var row = $('#dg').datagrid(
                                                'getSelected');
                                            if (row) {
                                                editrow(1);
                                            }
                                        }
                                    },
                                    ],
                                    onLoadSuccess: function () {
                                    },
                                    onDblClickRow: function () {
                                        editrow(0);
                                    }
                                });
                            $('#dg').datagrid('enableFilter');
                        }
                    </script>
                    <script>
                        function pushOa(node) {
                            $.ajax({
                                type: "post",
                                url: 'supply/info/pushOa?',
                                dataType: "json",
                                data: JSON.stringify(node),
                                contentType: "application/json",
                                success: function (data) {
                                    $.messager.alert('消息', data.msg);
                                    let dg = $('#dg');
                                    dg.datagrid('enableFilter');
                                    dg.datagrid('load');
                                },
                                error: function (XMLHttpRequest, textStatus, errorThrown) {
                                    $.messager.alert('消息', errorThrown);
                                }
                            });
                        }

                        function pushMdg(node) {
                            $.ajax({
                                type: "post",
                                url: 'supply/info/pushMdg?',
                                dataType: "json",
                                data: JSON.stringify(node),
                                contentType: "application/json",
                                success: function (data) {
                                    $.messager.alert('消息', data.msg);
                                    let dg = $('#dg');
                                    dg.datagrid('enableFilter');
                                    dg.datagrid('load');
                                },
                                error: function (XMLHttpRequest, textStatus, errorThrown) {
                                    $.messager.alert('消息', errorThrown);
                                }
                            });
                        }

                        function checkNo(node) {
                            $.ajax({
                                type: "post",
                                url: 'supply/info/checkNo?infId=' + node.infId,
                                dataType: "json",
                                // data: JSON.stringify(node),
                                contentType: "application/json",
                                success: function (data) {
                                    $.messager.alert('消息', data.msg);
                                    let dg = $('#dg');
                                    dg.datagrid('enableFilter');
                                    dg.datagrid('load');
                                },
                                error: function (XMLHttpRequest, textStatus, errorThrown) {
                                    $.messager.alert('消息', errorThrown);
                                }
                            });
                        }
                    </script>



                    <script type="text/javascript">
                        var selectedFileList = [];//已选文件列表
                        var succsessCount = 0;//上传成功文件个数
                        var errorCount = 0;//上传失败文件个数
                        /************文件处理部分*************/

                        /**
                         * 保存附件
                         */

                        function saveAttch(fileid, obj, action) {
                            let saveNum = 0
                            if (selectedFileList.length > 0) {
                                $.each(selectedFileList, function (index, item) {
                                    showFilediv();
                                    var dataform = new FormData();
                                    dataform.append("file", item);
                                    var xmlhttp = null;
                                    if (window.XMLHttpRequest) { // code for all new browsers
                                        xmlhttp = new XMLHttpRequest();
                                    } else if (window.ActiveXObject) {// code for IE5 and IE6
                                        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                                    }
                                    if (xmlhttp != null) {
                                        xmlhttp.open("POST", "api/file/springUpload?fileRow="
                                            + fileid + "&fileTable=supply_info&fileName="
                                            + item.name, true);
                                        xmlhttp.setRequestHeader('token', localStorage
                                            .getItem('token'));
                                        xmlhttp.setRequestHeader('userType', localStorage
                                            .getItem('userType'));
                                        xmlhttp.send(dataform);
                                        xmlhttp.onreadystatechange = callbackMethods;
                                    } else {
                                        alert("你的浏览器版本不兼容，请使用更高版本的浏览器");
                                    }

                                    function callbackMethods() {
                                        if (xmlhttp.readyState == 4) {
                                            if (xmlhttp.status == 200) {
                                                saveNum += 1
                                            }
                                            if (saveNum == selectedFileList.length) {
                                                hideFilediv();
                                            }
                                        } else {
                                            if (xmlhttp.status == 500) {
                                            }
                                        }
                                        var dg = $('#dg');
                                        dg.datagrid('enableFilter');
                                        dg.datagrid('load', {
                                            // startTime: startTime ? startTime : '',
                                            // endTime: endTime ? endTime : '',
                                            infApprovalStatus: status ? status : ''
                                        });
                                        $('#add').window('close');

                                    }
                                });
                            } else {
                                var dg = $('#dg');
                                dg.datagrid('enableFilter');
                                dg.datagrid('load', {
                                    // startTime: startTime ? startTime : '',
                                    // endTime: endTime ? endTime : '',
                                    infApprovalStatus: status ? status : ''
                                });
                                $('#add').window('close');

                            }
                        }

                        /**
                         *文件框改变事件
                         */
                        function changeFile() {
                            var files = $("#uploadpicker").prop("files");
                            $
                                .each(
                                    files,
                                    function (index, item) {
                                        let choiseFile = $("#checkfileList>li");
                                        if (choiseFile.length > 0) {//文件去重
                                            let count = 0;
                                            $.each(choiseFile, function (index1, item1) {
                                                if (item.name == item1.innerText) {
                                                    count++;
                                                }
                                            });
                                            if (count == 0) {
                                                if (checkFileLength(item.size)) {
                                                    if (item.name.includes('#') || item.name.includes('/') || item.name.includes('&') || item.name.includes('\\') || item.name.includes(' ')) {
                                                        alert('文件名不能包含&、斜杠、反斜杠、空格等特殊字符！');
                                                        return;
                                                    }
                                                    $("#checkfileList")
                                                        .append(
                                                            "<li class=\"fileinfo\">"
                                                            + item.name
                                                            + "<a style=\"display: none; color: red; margin-left: 10px;\" href=\"javascript:void(0)\" onclick=\"RemoveFile(this,'"
                                                            + item.name
                                                            + "')\">删除</a>"
                                                            + "</li>");
                                                    selectedFileList.push(item);
                                                    AddMoushover();
                                                }
                                            }
                                        } else {
                                            if (checkFileLength(item.size)) {
                                                if (item.name.includes('#') || item.name.includes('/') || item.name.includes('&') || item.name.includes('\\') || item.name.includes(' ')) {
                                                    alert('文件名不能包含&、斜杠、反斜杠、空格等特殊字符！');
                                                    return;
                                                }
                                                $("#checkfileList")
                                                    .append(
                                                        "<li class=\"fileinfo\">"
                                                        + item.name
                                                        + "<a style=\"display: none; color: red; margin-left: 10px;\" href=\"javascript:void(0)\" onclick=\"RemoveFile(this,'"
                                                        + item.name
                                                        + "')\">删除</a>"
                                                        + "</li>");
                                                selectedFileList.push(item);
                                                AddMoushover();
                                            }
                                        }
                                    });
                        }

                        /**
                         *    判断文件是否超过限制大小
                         * @param fileLen
                         * @returns {boolean}
                         */
                        function checkFileLength(fileLen) {
                            if (fileLen > 102400000) {
                                $.messager.alert("提示", "上传文件大小不能超过100M", "error");
                                return false;
                            }
                            return true;
                        }

                        /**
                         * //添加鼠标经过事件，鼠标划过时显示“删除”
                         * @constructor
                         */
                        function AddMoushover() {
                            $(".fileinfo").hover(function () {
                                $(this).find("a").last().css("display", "");
                            }, function () {
                                $(this).find("a").last().css("display", "none");
                            });
                        }

                        /**
                         *  移除已选择的文件
                         */

                        function RemoveFile(obj, fileId) {
                            $.messager.confirm("提示", "确认删除当前文件?", function (e) {
                                if (e) {
                                    let index = $("#checkfileList>li").index($(obj).parent());
                                    selectedFileList.splice(index, 1);
                                    $(obj).parent().remove();

                                    $.ajax({
                                        type: "post",
                                        url: 'file/deleteFile?fileId=' + fileId,
                                        success: function (data) {
                                            $.messager.alert('消息', data);
                                        },
                                        error: function (XMLHttpRequest, textStatus,
                                            errorThrown) {
                                            $.messager.alert('消息', errorThrown);
                                        }
                                    });

                                }
                            });
                        }

                        /**
                         * 取得该条数据所属的文件列表
                         * @param row
                         */
                        function getFileList(row) {
                            $.ajax({
                                type: "post",
                                url: "file/getFileList",
                                data: {
                                    fileTable: "supply_info",
                                    fileRow: row
                                },
                                success: function (data) {
                                    const dataArray = eval(data);
                                    initFile(dataArray);
                                },
                                error: function (XMLHttpRequest, textStatus, errorThrown) {
                                    $.messager.alert('消息', errorThrown);
                                }
                            });
                        }

                        /**
                         * 初始化该条数据的文件列表
                         * @param dataArray
                         */
                        function initFile(dataArray) {
                            $("#checkfileList").empty();
                            // 			sselectedFileNameList = [];
                            selectedFileList = [];
                            dataArray
                                .forEach(function (e, i, a) {
                                    $("#checkfileList")
                                        .append(
                                            "<li class=\"fileinfo\">"
                                            + "<a style=\" color: blue; margin-left: 30px;\" href=\"javascript:void(0)\" onclick=\"downloadFile('"
                                            + e.FILE_NAME
                                            + "','"
                                            + e.FILE_ID
                                            + "')\">"
                                            + e.FILE_NAME
                                            + "</a>"
                                            + "<a style=\"display: none; color: red; margin-left: 30px;\" href=\"javascript:void(0)\" onclick=\"RemoveFile(this,'"
                                            + e.FILE_ID + "')\">删除</a>"
                                            + "</li>");
                                    // 						sselectedFileNameList.push(e.FILE_NAME);
                                    AddMoushover();
                                });
                        }

                        // 文件下载
                        function downloadFile(fileName, fileRow) {
                            let url = 'api/file/download?id=' + fileRow
                            let xhr = new XMLHttpRequest()
                            xhr.open('GET', url, true)
                            xhr.setRequestHeader('token', localStorage.getItem('token'));
                            xhr.setRequestHeader('userType', localStorage.getItem('userType'));
                            xhr.responseType = 'blob'
                            xhr.onload = function (data) {
                                if (this.status == 200) {
                                    let blob = this.response
                                    let reader = new FileReader()
                                    reader.readAsDataURL(blob)
                                    reader.onload = function (e) {
                                        let a = document.createElement('a')
                                        a.download = fileName
                                        a.href = e.target.result
                                        $('body').append(a)
                                        a.click()
                                        $(a).remove()
                                    }
                                } else {

                                }
                            }
                            xhr.send()
                        }
                    </script>

                    <style scoped="scoped">
                        .textbox {
                            height: 20px;
                            margin: 0;
                            padding: 0 2px;
                            box-sizing: content-box;
                        }

                        /*.table tr {
        height: 15px;
    }*/
                    </style>
                    <div class="query_criteria" id="query_criteria">
                        <div style="margin: 5px 0px">
                            <%-- 搜索框 --%>
                                <!-- <label style="font-size: 12px;">创建时间：</label> <input class="easyui-datebox"
                                    name="startTime" id="startTime"
                                    data-options="required:true,showSeconds:false,formatter:myformatter,parser:myparser"
                                    value="" style="width: 150px"> <label style="font-size: 10px;">~</label> <input
                                    class="easyui-datebox" name="endTime" id="endTime"
                                    data-options="required:true,showSeconds:false,formatter:myformatter,parser:myparser"
                                    style="width: 150px" />  -->
                                <label style="margin-left: 20px; font-size: 12px;">状态：</label> <input
                                    class="easyui-combobox" id="status" name="status" style="width: 80px;" data-options="valueField: 'value',editable:false,
						textField: 'label',panelHeight:'auto',data: [{
							label: '全部',
							value: '',
							selected:true
						},{
							label: '待提交',
							value: '0'
						},{
							label: '已提交',
							value: '1'
						}]">
                                </select> <a id="search" style="margin-left: 30px" href="javascript:void(0)"
                                    class="easyui-linkbutton" data-options="iconCls:'icon-search'"
                                    onclick="selectList()">查询</a>
                        </div>
                        <table id="dg"></table>

                        <div id="add" class="easyui-window" closed="true" modal="true" title="用户信息"
                            style="width: 850px; height: 650px; padding: 10px 20px">
                            <form id="fm" class="ssec-form">
                                <div class="easyui-tabs" id="tabs" style="width: 810px; height: 550px"
                                    data-options="tools:'#tab-tools'">
                                    <div title="基本信息" style="padding: 5px;">
                                        <table class="table">
                                            <tr style="display: none;">
                                                <td>
                                                    <div class="ssec-label">供应商id：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infId" name="infId" class="easyui-textbox" />
                                                        <input id="oaStatus" name="oaStatus" class="easyui-textbox" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">状态：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infStatus" name="infStatus" class="easyui-textbox"
                                                            data-options="disabled:true" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">编码：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infCode" name="infCode" class="easyui-textbox"
                                                            data-options="disabled:true" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">准入目录：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="comAdmit" class="easyui-combotree"
                                                            data-options="editable:false,required:true"
                                                            style="width: 230px" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">名称(审批通过后不可更改)：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infName" name="infName" class="easyui-textbox" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">英文名称：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infNameEn" name="infNameEn" -->
                                            <!-- 							class="easyui-textbox" data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">供应商类别：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infCatagory" name="infCatagory" -->
                                            <!-- 							class="easyui-textbox" data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">企业性质：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infNature" name="infNature" -->
                                            <!-- 							class="easyui-textbox" data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">供应商类型：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infType" name="infType" -->
                                            <!-- 							class="easyui-textbox" data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">内部外部：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infIsInside" name="infIsInside" -->
                                            <!-- 							class="easyui-textbox" data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">社会信用代码：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infCreditCode" name="infCreditCode"
                                                            class="easyui-textbox" required="true" data-options="" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">注册资金：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infCapital" name="infCapital" -->
                                            <!-- 							class="easyui-textbox" data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">币种：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infCurrency" name="infCurrency" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">纳税人：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infTaxpayer" name="infTaxpayer" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">是否施工队：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infIsConstruction" name="infIsConstruction" -->
                                            <!-- 							class="easyui-textbox" data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">是否国外供应商：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infIsAbordSupply" name="infIsAbordSupply" -->
                                            <!-- 							class="easyui-textbox" data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">国家：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infCountry" name="infCountry" class="easyui-combobox"
                                                            data-options="editable:false,required:true,url:'sysDict/queryItemByTypeName?dicName=国家',method:'get',
																	  valueField:'dicValue',textField:'dicName',panelHeight:'auto'" />

                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">省份：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infProvince" name="infProvince"
                                                            class="easyui-combobox" data-options="editable:false,required:true,url:'sysDict/queryItemByTypeName?dicName=地区',method:'get',
																	  valueField:'dicValue',textField:'dicName',panelHeight:'auto'" />

                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">地市：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infCity" name="infCity" class="easyui-textbox"
                                                            data-options="required:true" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">县区：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infArea" name="infArea" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">邮政编码：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infPostal" name="infPostal" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">单位地址：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infAddress" name="infAddress" class="easyui-textbox"
                                                            data-options="required:true" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">电话：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infTelphone" name="infTelphone" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">企业网站：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infUrl" name="infUrl" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">邮箱：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infMail" name="infMail" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">传真：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infFax" name="infFax" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->

                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">身份证号：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infCard" name="infCard" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">法定代表人：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infLegalPerson" name="infLegalPerson"
                                                            class="easyui-textbox" data-options="required:true" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">手机：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infMobile" name="infMobile" class="easyui-textbox"
                                                            data-options="required:true" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">联系人姓名：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infContactsName" name="infContactsName"
                                                            class="easyui-textbox" data-options="required:true" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">联系人身份证：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infContactsCard" name="infContactsCard" -->
                                            <!-- 							class="easyui-textbox" data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">联系人座机：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infContacsTelphone" name="infContacsTelphone" -->
                                            <!-- 							class="easyui-textbox" data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">联系人手机：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infContactsMobile" name="infContactsMobile" -->
                                            <!-- 							class="easyui-textbox" data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">分行名称：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infBranchName" name="infBranchName" -->
                                            <!-- 							class="easyui-textbox" data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->

                                            <tr>
                                                <td>
                                                    <div class="ssec-label">税分类：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infTax" name="infTax" class="easyui-combobox"
                                                            data-options="editable:false,required:true,url:'sysDict/queryItemByTypeName?dicName=税分类',method:'get',
																	  valueField:'dicValue',textField:'dicName',panelHeight:'auto'" />


                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">语言：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infType" name="infType" class="easyui-combobox"
                                                            data-options="editable:false,required:true,url:'sysDict/queryItemByTypeName?dicName=语言',method:'get',
																	  valueField:'dicValue',textField:'dicName',panelHeight:'auto'" />


                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">付款条件：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="cobCondition" name="cobCondition"
                                                            class="easyui-combobox" data-options="editable:false,required:true,url:'sysDict/queryItemByTypeName?dicName=付款条件',method:'get',
																	  valueField:'dicValue',textField:'dicName',panelHeight:'auto'" />


                                                    </div>
                                                </td>
                                            </tr>
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">经营范围：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infRange" name="infRange" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">新源员工HI账号(请和联系人咨询)：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infGroup" name="infGroup" class="easyui-textbox"
                                                            data-options="required:true" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">采购组：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infGroupName" name="infGroupName"
                                                            class="easyui-textbox" data-options="" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">相关说明：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infExplain" name="infExplain" class="easyui-textbox"
                                                            data-options="multiline:true" style="height: 60px" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div class="ssec-label">邮箱：</div>
                                                </td>
                                                <td>
                                                    <div class="ssec-text normal">
                                                        <input id="infMail" name="infMail" class="easyui-textbox"
                                                            data-options="required:true,validType:'email'" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">审批状态：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="infApprovalStatus" name="infApprovalStatus" -->
                                            <!-- 							class="easyui-textbox" data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">create_time：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="createTime" name="createTime" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">create_name：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="createName" name="createName" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">create_id：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="createId" name="createId" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">修改人id：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="updateId" name="updateId" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">修改人：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="updateName" name="updateName" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">修改时间：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="updateTime" name="updateTime" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">是否删除：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="delFlag" name="delFlag" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">状态：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="status" name="status" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                            <!-- 			<tr> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-label">备注：</div> -->
                                            <!-- 				</td> -->
                                            <!-- 				<td> -->
                                            <!-- 					<div class="ssec-text normal"> -->
                                            <!-- 						<input id="remark" name="remark" class="easyui-textbox" -->
                                            <!-- 							data-options="required:true" /> -->
                                            <!-- 					</div> -->
                                            <!-- 				</td> -->
                                            <!-- 			</tr> -->
                                        </table>
                                    </div>
                                    <div title="银行信息">
                                        <div style="padding-left: 10px;padding-top: 10px;">
                                            <table id="ttBank"></table>
                                        </div>
                                    </div>
                                    <div title="经营范围">
                                        <div style="padding-left: 10px;padding-top: 10px;">
                                            <table id="ttSubject"></table>
                                        </div>
                                    </div>
                                    <div title="附件" style="padding: 5px;">
                                        <table>
                                            <tr>
                                                <td style="width: 180px;">
                                                    <div>附件：</div>
                                                    <div style="font-size: 10px;">
                                                        (营业执照、授权委托书、法人身份证、资质证书、相关业绩、近三年财务状况)</div>
                                                </td>
                                                <td><input type="button" id="uploadbtn" value="选择文件..." /> <input
                                                        type="file" id="uploadpicker" accept="" onchange="changeFile()"
                                                        multiple style="display: none;" />
                                                    <span>（文件名称不能包含斜杠、空格、&、#等特殊字符）</span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>附件下载：</td>
                                                <td>
                                                    <ul id="checkfileList"></ul>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                                <div id="tab-tools">
                                    <a class="easyui-linkbutton" onclick="save(0);" id="btnSave"
                                        iconcls="icon-save">保存</a>
                                    <a class="easyui-linkbutton" onclick="save(1);" id="btnCommit"
                                        iconcls="icon-ok">提交</a>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div id="dlgSubject" class="easyui-dialog" style="width:400px"
                        data-options="closed:true,modal:true,border:'thin',buttons:'#dlg-buttonsSubject'">
                        <form id="fmSubject" method="post" novalidate style="margin:0;padding:20px 50px">
                            <table>
                                <tr>
                                    <td>
                                        <span>选择公司:</span>
                                    </td>
                                    <td> <input id="cobCorp" style="width: 200px" class="easyui-combobox" data-options="url:'sysDict/queryItemByTypeName?dicName=交货工厂',method:'get',
																 valueField:'dicValue',textField:'dicName',panelHeight:'auto',required:true,editable:false,
																 onChange: function(newValue,oldValue){
																}"></td>
                                </tr>
                                <tr>
                                    <td>
                                        <span>选择经营范围:</span>
                                    </td>
                                    <td> <input id="cobSubject" style="width: 200px" class="easyui-combobox"
                                            data-options="url:'sysDict/queryItemByTypeName?dicName=科目',method:'get',
																 valueField:'dicValue',textField:'dicName',panelHeight:'auto',required:true,editable:false,
																 onChange: function(newValue,oldValue){
																}"></td>

                                </tr>
                            </table>
                        </form>
                    </div>
                    <div id="dlg-buttonsSubject">
                        <a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-ok"
                            onclick="saveSubject()" style="width:90px">保存</a>
                        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel"
                            onclick="javascript:$('#dlgSubject').dialog('close')" style="width:90px">关闭</a>
                    </div>

                    <div id="dlgBank" class="easyui-dialog" style="width:700px"
                        data-options="closed:true,modal:true,border:'thin',buttons:'#dlg-buttonsBank'">
                        <form id="fmBank" method="post" novalidate style="margin:0;padding:20px 50px">
                            <table>
                                <tr>
                                    <td>
                                        <div class="ssec-label">开户银行名称：</div>
                                        <div style="font-size: 10px;">（支持模糊查询，只显示前100条数据,如“石家庄东风支行”）</div>
                                    </td>
                                    <td>
                                        <div class="ssec-text normal">
                                            <input id="infBankName" style="width: 280px"></input>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <div class="ssec-label">账户姓名：</div>
                                    </td>
                                    <td>
                                        <div class="ssec-text normal">
                                            <input id="infBankAccount" name="infBankAccount" class="easyui-textbox"
                                                data-options="required:true" />
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <div class="ssec-label">账户号码：</div>
                                    </td>
                                    <td>
                                        <div class="ssec-text normal">
                                            <input id="infBankNumber" name="infBankNumber" class="easyui-textbox"
                                                data-options="required:true" />
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </form>
                    </div>
                    <div id="dlg-buttonsBank">
                        <a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-ok" onclick="saveBank()"
                            style="width:90px">保存</a>
                        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel"
                            onclick="javascript:$('#dlgBank').dialog('close')" style="width:90px">关闭</a>
                    </div>
        </body>

        </html>